import request from "@/utils/request";

/**
 * 获取视频流
 * @param {*} data
 */
export function getVideo(data) {
  return request({
    url: "http://10.166.147.60:9021/home/videoStreaming",
    method: "post",
    headers: {
      isVideoToken: false,
    },
    timeout: 100 * 1000,
    data,
  });
}

/**
 * 关闭视频流
 * @param {*} data
 */
export function closeVideo(data) {
  return request({
    url: "http://10.166.147.60:9021/home/closeViodeoStreaming",
    method: "get",
    headers: {
      isVideoToken: false,
    },
    params: data,
  });
}

export function getPics(data) {
  return request({
    url: "http://10.166.147.60:9021/picture/screenshot/inquireCamPic",
    method: "get",
    headers: {
        isVideoToken: false,
      },
    params: data,
  });
}

// 获取相机预置位
export function getCameraPreset(data) {
    return request({
      url: 'http://10.166.147.60:9021/home/selectPresetPositionList',
      method: 'post',
      headers: {
        isVideoToken: false,
      },
      data
    })
  }
